package top.cross.webapp.common;

import android.app.Application;
import android.os.Build;
import android.webkit.WebView;

import top.crossrun.webview.bridge.webview.x5.X5WebViewHelper;

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            String processName = getProcessName();
            if (!getPackageName().equals(processName)) {
                WebView.setDataDirectorySuffix(processName);
            }
        }
        X5WebViewHelper.initOnApplication(this);
    }
}
